import request from "../utils/request";


export const addAdRequest = (form) => {
    const params = new URLSearchParams()
    for(let key in form){
        params.append(key,form[key])
    }
    return request.post("/ad/addAdRequest",params)
}

export const deleteAdRequestService = (id) => {
    const params = new URLSearchParams()
    params.append("id",id)
    return request.put('/ad/deleteAdRequest',params)
}

export const getAllAdRequestService = () => {
    return request.get('/ad/getAllAdRequest')
}

export const passAdRequestService = (id) => {
    const params = new URLSearchParams()
    params.append("id",id)
    return request.put('/ad/passAdRequest',params)
}

export const refuseAdRequestService = (id) => {
    const params = new URLSearchParams()
    params.append("id",id)
    return request.put('/ad/refuseAdRequest',params)
}